﻿<%@ Page Title="" Language="C#" MasterPageFile="~/View/MasterPage.Master" AutoEventWireup="true" CodeBehind="AddCommunication.aspx.cs" Inherits="GRC_TPE_WebApp.View.Private.Communication.AddCommunication" %>

<%--Title--%>
<asp:Content ID="Content1" ContentPlaceHolderID="title" runat="server">
</asp:Content>

<%--Contenu--%>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <fieldset>
        <legend>Ajouter une communication : </legend>
                <table>
                    <tr>
                        <asp:ValidationSummary ID="addCommunicationSummary" runat="server"
                        headerText="Il y a des erreurs sur la page :" />
                    </tr>
                    <tr>
                        <td>Titre : </td>
                        <td>
                            <asp:TextBox ID="addCommunicationTitle" runat="server" Width="350" />

                            <%--Validator--%>
                            <asp:RequiredFieldValidator ID="titleRequired" runat="server"
                            ControlToValidate="addCommunicationTitle"
                            ErrorMessage="Le titre est requis"> *
                            </asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>Date : </td>
                        <td>
                            <asp:Calendar ID="C_Date" runat="server" OtherMonthDayStyle-ForeColor="DimGray"></asp:Calendar>
                            <%--<asp:TextBox ID="addCommunicationDate" runat="server" />--%>
                            
                            <%--Validator--%>
                            <%--<asp:RequiredFieldValidator ID="dateRequired" runat="server"
                            ControlToValidate="C_Date"
                            ErrorMessage="La date est requise."> *
                            </asp:RequiredFieldValidator>

                            <asp:CompareValidator id="dateValidated" runat="server" ControlToValidate="addCommunicationDate"
                            Operator="DataTypeCheck" Type="Date" ErrorMessage="Format de la date : dd/mm/yyyy)." EnableClientScript="False">
                            </asp:CompareValidator>--%>
                        </td>
                    </tr>
                    <tr>
                        <td>Type : </td>
                        <td>
                            <asp:DropDownList ID="addCommunicationType" runat="server">
                                <asp:ListItem>E-mail</asp:ListItem>
                                <asp:ListItem>Téléphone</asp:ListItem>
                                <asp:ListItem>Visite</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>Description : </td>
                        <td>
                            <asp:TextBox ID="addCommunicationDescription" runat="server" TextMode="MultiLine" Width="350" Height="100"/>

                            <%--Validator--%>
                            <asp:RequiredFieldValidator ID="descriptionRequired" runat="server"
                            ControlToValidate="addCommunicationDescription"
                            ErrorMessage="Le description est requise"> *
                            </asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>Client : </td>
                        <td>
                            <asp:Label ID="L_Client" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>Commercial : </td>
                        <td>
                            <asp:Label ID="L_User" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td><asp:Button ID="addCommunicationButton" runat="server" Text="Ajouter une communication" OnClick="addCommunicationButton_Click"/></td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="addCommunicationErrorMessage"  runat="server" />
                        </td>
                    </tr>
                </table>
    </fieldset>

</asp:Content>

<%--Footer--%>
<asp:Content ID="Content6" ContentPlaceHolderID="footer" runat="server">
</asp:Content>